from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
import time

browser=webdriver.Chrome()
browser.get('https://www.12306.cn/index/')
locator=(By.id,"fromStationText")
wait=WebDriverWait(browser,10).until(EC.presence_of_all_elements_located(locator))
input=browser.find_element_by_id("fromstationtext")
input.clear()
input.send_keys("厦门")
time.sleep(3)
browser.close()
